Traditional unlocking mode of an electronic device includes a sliding to unlock mode, a pattern matching mode, or a fingerprint recognition mode. However, the above unlocking modes are easily cracked, thus improvements in the art of protecting user's personal information and confidential information is necessary.